import { useRoute } from 'vue-router'
import { useI18n } from 'vue-i18n'

export default function () {
  const {
    t,
    locale
  } = useI18n()
  // 如果url中存在 lang 则切换语言
  const route = useRoute()
  locale.value = localStorage.getItem('lang') || 'zh_CN'
  return { t }
}
